package com.spring.boot.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Table(name="orders")
@Entity
public class Orders {
	public Orders(){}
	
	public Orders(Long orderId, String orderName, String orderNo,
			String orderAdress, Date orderTime, Date modifyTime, Long userId) {
		super();
		this.orderId = orderId;
		this.orderName = orderName;
		this.orderNo = orderNo;
		this.orderAdress = orderAdress;
		this.orderTime = orderTime;
		this.modifyTime = modifyTime;
		this.userId = userId;
	}


	@Id
	@GeneratedValue
	private Long orderId;
	
	private String orderName;
	private String orderNo;
	private String orderAdress;
	@Column(columnDefinition="char")
	private Date orderTime;
	@Column(columnDefinition="char")
	private Date modifyTime;
	private Long userId;
	
	public Long getOrderId() {
		return orderId;
	}


	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}


	public String getOrderName() {
		return orderName;
	}


	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}


	public String getOrderNo() {
		return orderNo;
	}


	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}


	public String getOrderAdress() {
		return orderAdress;
	}


	public void setOrderAdress(String orderAdress) {
		this.orderAdress = orderAdress;
	}

	@Column(columnDefinition="char")
	public Date getOrderTime() {
		return orderTime;
	}


	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}


	@Column(columnDefinition="char")
	public Date getModifyTime() {
		return modifyTime;
	}


	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}


	public Long getUserId() {
		return userId;
	}


	public void setUserId(Long userId) {
		this.userId = userId;
	}


	@Override
	public String toString() {
		return "Orders [orderId=" + orderId + ", orderName=" + orderName
				+ ", orderNo=" + orderNo + ", orderAdress=" + orderAdress
				+ ", orderTime=" + orderTime + ", modifyTime=" + modifyTime
				+ ", userId=" + userId + "]";
	}
	
}
